package com.java.base.exercise;

import com.java.base.exercise.jvm.User;

/**
 * @Author RenPu
 * @Date 2024/2/23 11:37
 * @Version 1.0
 * @Description: 测试JIT中得标量替换，是否需要满足热点代码次数（10000）才可以触发
 *
 *                -XX:-DoEscapeAnalysis -XX:-EliminateAllocations -XX:+PrintGC
 **/
public class JitTest {

    public static void main(String[] args) {
        for (int i = 0; i < 1000000; i++) {
            allcoate();
        }
    }

    private static void allcoate() {
        Teacher teacher = new Teacher(6000.0,32);

//        user.setAge(18);
//        user.setName("王五");

    }


}
